<div class="chucdanhs index">
	<h2><?php __('Danh sách chức danh');?></h2>
	<table class="table table-bordered table-consended table-hover">
	<tr class="info">
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('cd_maso');?></th>
			<th><?php echo $this->Paginator->sort('cd_ten');?></th>
			<th><?php echo $this->Paginator->sort('ghichu');?></th>
			<th class="actions"><?php __('Cập nhật');?></th>
	</tr>
	<?php
	$i = 0;
	$stt = 0;
	foreach ($chucdanhs as $chucdanh):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td style="text-align:right"><?php echo ++$stt; ?>&nbsp;</td>
		<td style="text-align:center"><?php echo $chucdanh['Chucdanh']['cd_maso']; ?>&nbsp;</td>
		<td><?php echo $chucdanh['Chucdanh']['cd_ten']; ?>&nbsp;</td>
		<td><?php echo $chucdanh['Chucdanh']['ghichu']; ?>&nbsp;</td>
		<td class="actions">
		<button class="btn btn-success" onclick="window.location.href='<?php echo Router::url(array('action' => 'view', $chucdanh['Chucdanh']['id']))?>'"><i class="icon-zoom-in "></i></button>
            <button class="btn btn-info" onclick="window.location.href='<?php echo Router::url( array('action' => 'edit', $chucdanh['Chucdanh']['id']))?>'"><i class="icon-edit "></i></button>
            <button class="btn btn-danger" onclick="if(confirm('Có chắc bạn muốn xóa chức danh <?= $chucdanh['Chucdanh']['cd_ten'] ?>?')) window.location.href='<?php echo Router::url(array('action' => 'delete', $chucdanh['Chucdanh']['id']))?>'"><i class="icon-trash "></i></button>

		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page% của %pages%, hiển thị %current% dòng của tổng số %count% dòng, từ %start% đến %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<div class="actions">
	<h3><?php __('Cập nhật'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Thêm chức danh', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('Danh sách cán bộ', true), array('controller' => 'canbos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm cán bộ', true), array('controller' => 'canbos', 'action' => 'add')); ?> </li>
	</ul>
</div>